package com.job.sun.HomeWork0707;

/**
 * @author 张春阳
 * @version 1.0
 * @since 2022-07-08 17:15:50
 * 权限限制符
 */
public class Work {
    public String name = "张三";
    int age = 27;
    private double weight;
//-------------------------------------------------------
    public void show1() {
        System.out.println("public公开的");
    }

    void show2() {
        System.out.println("默认的");
    }

    private void show3() {
        System.out.println("private私人的");
    }
//---------------------------------------------------------
    public Work() {
    }

    public Work(String name) {
        this.name = name;
    }

     Work(String name, int age) {
        this.name = name;
        this.age = age;
    }

    private Work(String name, int age, double weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }
 //----------------------------------------
 public static void main(String[] args) {
     //可以使用public 默认的 private
     Work worker =new Work("赵六", 25, 65);
     System.out.println(worker.weight);
     worker.show3();
 }
}